<?php

/**
 * empresa form base class.
 *
 * @package    gescell
 * @subpackage form
 * @author     Your name here
 * @version    SVN: $Id: sfPropelFormGeneratedTemplate.php 16976 2009-04-04 12:47:44Z fabien $
 */
class BaseempresaForm extends BaseFormPropel
{
  public function setup()
  {
    $this->setWidgets(array(
      'id'              => new sfWidgetFormInputHidden(),
      'nombre_empresa'  => new sfWidgetFormInput(),
      'nombre_director' => new sfWidgetFormInput(),
      'logo'            => new sfWidgetFormInput(),
      'direccion'       => new sfWidgetFormInput(),
      'telefono'        => new sfWidgetFormInput(),
      'correo_empresa'  => new sfWidgetFormInput(),
      'correo_director' => new sfWidgetFormInput(),
      'activo'          => new sfWidgetFormInputCheckbox(),
      'created_at'      => new sfWidgetFormDateTime(),
      'updated_at'      => new sfWidgetFormDateTime(),
    ));

    $this->setValidators(array(
      'id'              => new sfValidatorPropelChoice(array('model' => 'empresa', 'column' => 'id', 'required' => false)),
      'nombre_empresa'  => new sfValidatorString(array('max_length' => 255, 'required' => false)),
      'nombre_director' => new sfValidatorString(array('max_length' => 255, 'required' => false)),
      'logo'            => new sfValidatorString(array('max_length' => 255, 'required' => false)),
      'direccion'       => new sfValidatorString(array('max_length' => 255, 'required' => false)),
      'telefono'        => new sfValidatorString(array('max_length' => 20, 'required' => false)),
      'correo_empresa'  => new sfValidatorString(array('max_length' => 100, 'required' => false)),
      'correo_director' => new sfValidatorString(array('max_length' => 100, 'required' => false)),
      'activo'          => new sfValidatorBoolean(array('required' => false)),
      'created_at'      => new sfValidatorDateTime(array('required' => false)),
      'updated_at'      => new sfValidatorDateTime(array('required' => false)),
    ));

    $this->widgetSchema->setNameFormat('empresa[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    parent::setup();
  }

  public function getModelName()
  {
    return 'empresa';
  }


}
